/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import java.awt.event.ActionEvent;
import javax.swing.JOptionPane;

/**
 *
 * @author hp
 */
public class GuiPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form GuiPrincipal
     */
    public GuiPrincipal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenu3 = new javax.swing.JMenu();
        lbl_Saudação = new javax.swing.JLabel();
        Menu_Principal = new javax.swing.JMenuBar();
        Menu_Cadastrar = new javax.swing.JMenu();
        ItemMenuCadastrar_Cliente = new javax.swing.JMenuItem();
        ItemMenuCadastrar_Vendedor = new javax.swing.JMenuItem();
        ItemMenuCadastrar_Peças = new javax.swing.JMenuItem();
        Menu_Consultar = new javax.swing.JMenu();
        ItemMenuConsultar_Cliente = new javax.swing.JMenuItem();
        ItemMenuConsultar_Vendedor = new javax.swing.JMenuItem();
        ItemMenuConsultar_Peças = new javax.swing.JMenuItem();
        Menu_Vendas = new javax.swing.JMenu();

        jMenu3.setText("jMenu3");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        lbl_Saudação.setBackground(new java.awt.Color(204, 0, 204));
        lbl_Saudação.setFont(new java.awt.Font("Rage Italic", 0, 48)); // NOI18N
        lbl_Saudação.setText("Bem-Vindo !");

        Menu_Cadastrar.setText("Cadastrar");

        ItemMenuCadastrar_Cliente.setText("Cliente");
        ItemMenuCadastrar_Cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuCadastrar_ClienteActionPerformed(evt);
            }
        });
        Menu_Cadastrar.add(ItemMenuCadastrar_Cliente);

        ItemMenuCadastrar_Vendedor.setText("Vendedor");
        ItemMenuCadastrar_Vendedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuCadastrar_VendedorActionPerformed(evt);
            }
        });
        Menu_Cadastrar.add(ItemMenuCadastrar_Vendedor);

        ItemMenuCadastrar_Peças.setText("Peças");
        ItemMenuCadastrar_Peças.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuCadastrar_PeçasActionPerformed(evt);
            }
        });
        Menu_Cadastrar.add(ItemMenuCadastrar_Peças);

        Menu_Principal.add(Menu_Cadastrar);

        Menu_Consultar.setText("Consultar");

        ItemMenuConsultar_Cliente.setText("Cliente");
        ItemMenuConsultar_Cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuConsultar_ClienteActionPerformed(evt);
            }
        });
        Menu_Consultar.add(ItemMenuConsultar_Cliente);

        ItemMenuConsultar_Vendedor.setText("Vendedor");
        ItemMenuConsultar_Vendedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuConsultar_VendedorActionPerformed(evt);
            }
        });
        Menu_Consultar.add(ItemMenuConsultar_Vendedor);

        ItemMenuConsultar_Peças.setText("Peças");
        ItemMenuConsultar_Peças.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemMenuConsultar_PeçasActionPerformed(evt);
            }
        });
        Menu_Consultar.add(ItemMenuConsultar_Peças);

        Menu_Principal.add(Menu_Consultar);

        Menu_Vendas.setText("Vendas");
        Menu_Vendas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Menu_VendasMouseClicked(evt);
            }
        });
        Menu_Principal.add(Menu_Vendas);

        setJMenuBar(Menu_Principal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(90, 90, 90)
                .addComponent(lbl_Saudação, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addComponent(lbl_Saudação, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void Menu_VendasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Menu_VendasMouseClicked
        // TODO add your handling code here:
            GuiVendas telaGuiVendas = new GuiVendas();
            telaGuiVendas.setVisible(true);
    }//GEN-LAST:event_Menu_VendasMouseClicked

    private void ItemMenuCadastrar_ClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuCadastrar_ClienteActionPerformed
        // TODO add your handling code here:
        GuiCadastrarClientes telaCadastrarCliente = new GuiCadastrarClientes();
        telaCadastrarCliente.setVisible(true);
    }//GEN-LAST:event_ItemMenuCadastrar_ClienteActionPerformed

    private void ItemMenuCadastrar_VendedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuCadastrar_VendedorActionPerformed
        // TODO add your handling code here:
        GuiCadastrarVendedor telaCadastrarVendedor = new GuiCadastrarVendedor();
        telaCadastrarVendedor.setVisible(true);
    }//GEN-LAST:event_ItemMenuCadastrar_VendedorActionPerformed

    private void ItemMenuCadastrar_PeçasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuCadastrar_PeçasActionPerformed
        // TODO add your handling code here:
        GuiCadastrarPeças telaConsultarPeças = new GuiCadastrarPeças();
        telaConsultarPeças.setVisible(true);
    }//GEN-LAST:event_ItemMenuCadastrar_PeçasActionPerformed

    private void ItemMenuConsultar_ClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuConsultar_ClienteActionPerformed
        // TODO add your handling code here:
        GuiConsultarCliente telaConsultarCliente = new GuiConsultarCliente();
        telaConsultarCliente.setVisible(true);
    }//GEN-LAST:event_ItemMenuConsultar_ClienteActionPerformed

    private void ItemMenuConsultar_VendedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuConsultar_VendedorActionPerformed
        // TODO add your handling code here:
        GuiConsultarVendedor telaConsultarVendedor = new GuiConsultarVendedor();
        telaConsultarVendedor.setVisible(true);
    }//GEN-LAST:event_ItemMenuConsultar_VendedorActionPerformed

    private void ItemMenuConsultar_PeçasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemMenuConsultar_PeçasActionPerformed
        // TODO add your handling code here:
        GuiConsultarPeças telaConsultarPeças = new GuiConsultarPeças();
        telaConsultarPeças.setVisible(true);
    }//GEN-LAST:event_ItemMenuConsultar_PeçasActionPerformed

    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GuiPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GuiPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GuiPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GuiPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GuiPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem ItemMenuCadastrar_Cliente;
    private javax.swing.JMenuItem ItemMenuCadastrar_Peças;
    private javax.swing.JMenuItem ItemMenuCadastrar_Vendedor;
    private javax.swing.JMenuItem ItemMenuConsultar_Cliente;
    private javax.swing.JMenuItem ItemMenuConsultar_Peças;
    private javax.swing.JMenuItem ItemMenuConsultar_Vendedor;
    private javax.swing.JMenu Menu_Cadastrar;
    private javax.swing.JMenu Menu_Consultar;
    private javax.swing.JMenuBar Menu_Principal;
    private javax.swing.JMenu Menu_Vendas;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JLabel lbl_Saudação;
    // End of variables declaration//GEN-END:variables
}
